package org.shiki.hrm.controller;

import org.shiki.hrm.util.AjaxResult;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SuccessController {
	@PostMapping("/success")
	public AjaxResult success(){
		String name = SecurityContextHolder.getContext().getAuthentication().getName();
		return AjaxResult.me().setMessage(name + ",欢迎回来");
	}
}
